Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CV2-5596: remove empty tags before create tags in background #2115

Conversation

melsawy
Copy link
Contributor

@melsawy melsawy commented Oct 31, 2024

Description

  • Fix Sentry error related to tags can't be blank by remove blank tags from tags array.
  • Create a background job for creating tags if tags not empty.

References: CV2-5596

How has this been tested?

re-produce the bug using unit test.

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

GenericWorker.perform_async('Tag', 'create_project_media_tags', project_media_id, tags_json, user_id: pm.user_id)
end
tags_json = [''].to_json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melsawy just a question: Could this second part (from line 42 to 47) be a separate test?

Copy link
Contributor Author

@melsawy melsawy Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vasconsaurus I see that title for testing is should run a job, without raising an error so I append this case instead of creating a new test with team, item, etc...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes total sense, thank you @melsawy

@melsawy melsawy requested a review from vasconsaurus October 31, 2024 13:19
Copy link
Contributor

@caiosba caiosba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pair-reviewed with Sawy in a 1:1 meeting.

@melsawy melsawy merged commit 6547324 into develop Nov 2, 2024
11 checks passed
@melsawy melsawy deleted the CV2-5596-side-kiq-dead-jobs-active-record-record-invalid-text-cant-be-blank branch November 2, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants